<style type="text/css">
    .b{
        border-bottom: 1px solid #f6f6f6;
        border-width: 1px;
        border-style: solid;
        border-color: #e6e6e6;
    }
    .layui-inline{

    }
    .layui-form-label{
        width: 140px;
    }
    .main {
        float: left;
        width: 100%;
    }
    .main-content {
        margin-left: 465px;
    }
    .left{
        width: 450px;
        float: left;
        margin-left:-100%;
    }
    .wb33{
        float: left;
        width: 50%;
    }
    .layui-clear{
        margin-bottom: 15px;
    }
</style>
<div class="layui-fluid">
    <div class="layui-breadcrumb jy-breadcrumb">
    </div>
    <div id ='view'></div>
</div>
<script id="page1" type="text/html">
    <div class="layui-card">
        <div class="layui-card-header">
        <span style="padding: 20px;font-size:20px;color:#ADADAD">
            <b>基本信息</b>
        </span>
            <span style="float:right;padding: 0px 60px 0px 0px">
            <a class="layui-btn layui-btn-normal layui-btn-sm" href="/#/Datamanufacture/manufacture" >返 回</a>
        </span>
        </div>
        <div class="layui-row "  style="">

            <div class="main" >
                <div class="layui-row grid-demo grid-demo-bg1 main-content layui-form " style="padding-top: 20px">

                    <div class="layui-clear">
                        <div class=" wb33">
                            <label class="layui-label layui-form-label-yh">SKU</label>
                            <div class="layui-inline">{{d.sku||''}}</div>
                        </div>

                        <div class="  wb33">
                            <label class="layui-label layui-form-label-yh">SPU</label>
                            <div class="layui-inline">{{d.spu||''}}</div>
                        </div>
                    </div>


                    <div class="layui-clear">
                        <div class=" wb33">
                            <label class="layui-label layui-form-label-yh"> 采购名称</label>
                            <div class="layui-inline">{{d.name||''}}</div>
                        </div>

                        <div class=" wb33">
                            <label class="layui-label layui-form-label-yh"> 状态</label>
                            <div class="layui-inline">{{d.sales_status_name||''}}</div>
                        </div>

                    </div>

                    <div class="layui-clear">
                        <div class="  wb33">
                            <label class="layui-label layui-form-label-yh">自带包装重量</label>
                            <div class="layui-inline">{{d.asweight||''}}</div>
                        </div>
                        <div class=" wb33">
                            <label class="layui-label layui-form-label-yh">打包后重量</label>
                            <div class="layui-inline">{{d.baleweight||''}}</div>
                        </div>

                    </div>

                    <div class="layui-clear">
                        <div class=" wb33">
                            <label class="layui-label layui-form-label-yh">自带包装宽</label>
                            <div class="layui-inline">{{d.aswide||''}}</div>
                        </div>

                        <div class="  wb33">
                            <label class="layui-label layui-form-label-yh">打包后宽</label>
                            <div class="layui-inline">{{d.balewide||''}}</div>
                        </div>

                    </div>
                    <div class="layui-clear">

                        <div class="  wb33">
                            <label class="layui-label layui-form-label-yh">自带包装长</label>
                            <div class="layui-inline">{{d.aslength||''}}</div>
                        </div>
                        <div class=" wb33">
                            <label class="layui-label layui-form-label-yh">打包后长</label>
                            <div class="layui-inline">{{d.balelength||''}}</div>
                        </div>

                    </div>

                    <div class="layui-clear">
                        <div class="  wb33">
                            <label class="layui-label layui-form-label-yh">自带包装高</label>
                            <div class="layui-inline">{{d.ashight||''}}</div>
                        </div>

                        <div class="  wb33">
                            <label class="layui-label layui-form-label-yh">打包后高</label>
                            <div class="layui-inline">{{d.balehight||''}}</div>
                        </div>
                    </div>
                    <div class="layui-clear">
                        <div class="  wb33">
                            <label class="layui-label layui-form-label-yh">容量/体积</label>
                            <div class="layui-inline">{{d.bulk+d.bulk_unit||''}}</div>
                        </div>
                        <div class="  wb33">
                            <label class="layui-label layui-form-label-yh">参考价</label>
                            <div class="layui-inline">{{d.reference_price||''}}</div>
                        </div>
                    </div>
                    <div class="layui-clear">
                        <div class=" ">
                            <label class="layui-label layui-form-label-yh">分类</label>
                            <div class="layui-inline">{{d.categorypath||''}}</div>
                        </div>
                    </div>
                    <div class="layui-clear">
                        <div class="  wb33">
                            <label class="layui-label layui-form-label-yh">EAN码</label>
                            <div class="layui-inline">{{d.eancode||''}}</div>
                        </div>
                    </div>

                </div>
            </div>

            <div class="left">
                <div class="layui-carousel" id="test1">
                    <div carousel-item="">
                        {{# if(d.img.length == undefined){ }}
                            <div><img src="/layui/images/img/timg.jpg" style="width: 100%;height: 100%;"></div>
                        {{# }else{ }}
                        
                        {{# for (var i=0;i<d.img.length;i++){ }}
                            <div><img src="{{d.img[i]}}" style="width: 100%;height: 100%;"></div>
                        {{# } }}
                        {{# } }}
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="layui-card">
        <div class="layui-card-header">
        <span style="padding: 20px;font-size:20px;color:#ADADAD">
            <b>标题</b>
        </span>
        </div>
        <div class="layui-row layui-col-space15"  style="padding: 20px 0px 0px 20px">
            <div class="layui-col-md12" >
                <div class="layui-row grid-demo grid-demo-bg1">

                    <div class="layui-inline">
                        <div class="layui-input-block">
                            {{d.title||''}}
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="layui-card">
        <div class="layui-card-header">
        <span style="padding: 20px;font-size:20px;color:#ADADAD">
            <b>描述</b>
        </span>
        </div>
        <div class="layui-row layui-col-space15"  style="padding: 20px 0px 0px 20px">
            <div class="layui-col-md12" >
                <div class="layui-row grid-demo grid-demo-bg1">

                    <div class="layui-inline">
                        <div class="layui-input-block">
                            {{d.description||''}}
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="layui-card">
        <div class="layui-card-header">
        <span style="padding: 20px;font-size:20px;color:#ADADAD">
            <b>产品属性</b>
        </span>
        </div>
        <div class="layui-row layui-col-space15"  style="padding: 20px 0px 0px 20px">
            <div class="layui-col-md12" >
                <div class="layui-row grid-demo grid-demo-bg1">

                    <div class="layui-inline">
                        <div class="layui-input-block">
                            {{d.productattr||''}}
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="layui-card">
        <div class="layui-card-header">
        <span style="padding: 20px;font-size:20px;color:#ADADAD">
            <b>多属性</b>
        </span>
        </div>
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md12" >
                <div class="layui-row grid-demo grid-demo-bg1">
                    <div class="layui-inline">
                        <div class="layui-input-block">
                            <div>
                                <b style="font-size:15px">color：</b>{{d.color||''}}<br/>
                                <b style="font-size:15px">type：</b>{{d.type||''}}<br/>
                                <b style="font-size:15px">shape：</b>{{d.shape||''}}<br/>
                                <b style="font-size:15px">size：</b>{{d.size||''}}<br/>
                                <b style="font-size:15px">pattern：</b>{{d.pattern||''}}
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</script>
<script>
    layui.use(['form','carousel','laytpl','toolJ'], function () {
        var $ = layui.$
            , carousel = layui.carousel
            , laytpl = layui.laytpl
            , toolJ = layui.toolJ
            , form = layui.form;
        var id = layui.router().search.id;

        toolJ.ajax({"data": {"id": id}, "type": "get"},
            function (data) {
                var getTpl = page1.innerHTML,
                    view = $('#view');
                laytpl(getTpl).render(data.data, function (html) {
                    view.html(html);
                });
                //图片轮播
                carousel.render({
                    elem: '#test1'
                    ,width: '100%'
                    ,height: '300px'
                    ,interval: 5000
                });
            }
        );
    });
</script>